#pragma once

#include "Unit.h"

Unit::Unit(string mFile, string dFile, string iconLoc, string n, string a, D3DXMATRIX tMatrix)
:Object(mFile, dFile, iconLoc, n, a, tMatrix), level(0), group(0) {}

Unit::Unit(string mFile, string dFile, string iconLoc, string n, string a, D3DXMATRIX tMatrix, 
		   int val, string cMove, string st)
:Object(mFile, dFile, iconLoc, n, a, tMatrix), value(val), canMove(cMove), stance(st), level(0), group(0) {}

void Unit::setLevel(int lvl) {
	level = lvl;
}

void Unit::setValue(int val) {
	value = val;
}

void Unit::setCanMove(string cMove) {
	canMove = cMove;
}

void Unit::setStance(string st) {
	stance = st;
}

void Unit::setGroup(int grp) {
	group = grp;
}

int Unit::getLevel(void) {
	return level;
}

int Unit::getValue(void) {
	return value;
}

string Unit::getCanMove(void) {
	return canMove;
}

string Unit::getStance(void) {
	return stance;
}

int Unit::getGroup(void) {
	return group;
}

void Unit::saveInfoToFile(ofstream &out) {
	out << modelFile << "\n";
	out << dataFile << "\n";
	out << iconLocation << "\n";
	out << name << "\n";
	out << alignment << "\n";
	out << getPosition().x << " ";
	out << getPosition().y << " ";
	out << getPosition().z << "\n";
	out << getScale().x << " ";
	out << getScale().y << " ";
	out << getScale().z << "\n";
	out << getRotation().x << " ";
	out << getRotation().y << " ";
	out << getRotation().z << "\n";

	out << level << "\n";
	out << value << "\n";
	out << canMove << "\n";
	out << stance << "\n";
	out << group << "\n";
}